﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;

namespace Mvc.Models
{
     [Table("TBR_Municipios")]
    public class Municipio
    {

        [Key]
        public int ID { get; set; }
        [Display(Name = "Nombre")]
        [Required(ErrorMessage = "El nombre es requerido")]
        public string Nombre { get; set; }

        [Display(Name = "Código")]
        [Required(ErrorMessage = "El código es requerido")]
        public string CodigoDivipola { get; set; }

        [Display(Name = "Regional")]
        [Required(ErrorMessage = "Debe eligir un departamento ")]
        public int DepartamentoID { get; set; }
        public virtual Departamento Departamento { get; set; }
    }
}